package com.flyone.fuxiao.service;

import com.flyone.fuxiao.model.dto.gpt.ChatHistoryAddRequest;
import com.flyone.fuxiao.model.dto.gpt.GptAddRequest;
import com.flyone.fuxiao.model.entity.ChatHistory;
import com.baomidou.mybatisplus.extension.service.IService;
import com.flyone.fuxiao.model.vo.ChatHistoryRecordVO;
import com.flyone.fuxiao.model.vo.ChatHistoryVO;
import io.reactivex.Flowable;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
* @author luoyifei
*/
public interface ChatHistoryService extends IService<ChatHistory> {

    Flowable<String> generateTextByFlyone(GptAddRequest gptAddRequest, HttpServletResponse response, HttpServletRequest request);

    String saveChatHistory(String token, ChatHistoryAddRequest chatHistoryAddRequest, HttpServletRequest request);

    List<ChatHistoryVO> getAllChatHistory(HttpServletRequest request);

    List<ChatHistoryRecordVO> getHistoryRecordByToken(String token, HttpServletRequest request);

    String deleteHistoryRecordByToken(String token, HttpServletRequest request);
}
